package com.ailk.emall.system.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.ailk.emall.system.interceptors.LoginInterceptor;

/** 
 * web相关的配置
 * @author zhaowg3
 * @Date 2017年1月6日
 */
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter{
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		//添加登陆拦截器
		registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**")
					.excludePathPatterns("/login/**","/verifyCode/**","/error");
		super.addInterceptors(registry);
	}
}
